import request from '@/utils/request'

// 查询危险点分页
export function pagePoints(query) {
  return request({
    url: '/risk/points/page',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询危险点列表
export function listPoints(query) {
  return request({
    url: '/risk/points/list',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询危险点详细
export function getPoints(id) {
  return request({
    url: '/risk/points/info/' + id,
    method: 'get'
  })
}

// 新增危险点
export function addPoints(data) {
  return request({
    url: '/risk/points',
    method: 'post',
    data: data
  })
}

// 修改危险点
export function updatePoints(data) {
  return request({
    url: '/risk/points',
    method: 'put',
    data: data
  })
}

// 删除危险点
export function delPoints(data) {
  return request({
    url: '/risk/points/remove/batch',
    method: 'delete',
    data
  })
}

// 导出危险点
export function exportPoints(query) {
  return request({
    url: '/risk/points/export',
    method: 'get',
    params: query
  })
}

// 下载模板危险点
export function downImportTemplate() {
  return request({
    url: '/risk/points/importTemplate',
    method: 'get'
  })
}
